package com.wash.shoes.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.StringUtils;
import com.wash.shoes.entity.BannerPo;
import com.wash.shoes.mapper.BannerMapper;
import com.wash.shoes.page.PageFactory;
import com.wash.shoes.service.BannerService;
import com.wash.shoes.util.HeaderUtil;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 系统的图片 服务实现类
 * </p>
 *
 * @author ljg
 * @since 2024-12-12
 */
@Service
public class BannerServiceImpl extends ServiceImpl<BannerMapper, BannerPo> implements BannerService {

    /**
     * 查询列表
     *
     * @param bannerPo
     * @return
     */
    @Override
    public Page<BannerPo> pageList(BannerPo bannerPo) {
        Page<BannerPo> page = PageFactory.defaultPage();
//        String poId=null;
//        if(StringUtils.isNoneBlank(bannerPo.getChannel())){
//            poId= HeaderUtil.getPoId();
//        }
        List<BannerPo> dataList = baseMapper.pageList(page, bannerPo,null);
        page.setRecords(dataList);
        return page;
    }
}
